break;
case SIOEMU_HYPERCALL_GET_TIME:
{
- uint64_t sec, nsec;
- get_wallclock(&sec, &nsec);
+ uint64_t sec, nsec, now;
+ get_wallclock(&sec, &nsec, &now);
regs->r8 = (sec << 30) + nsec;
+ regs->r9 = now;
break;
}
case SIOEMU_HYPERCALL_GET_REGS:
case SIOEMU_HYPERCALL_CALLBACK_RETURN:
regs->r2 = regs->r27;
sioemu_callback_return ();
+ vcpu_decrement_iip(current);
break;
default:
panic_domain (NULL, "bad sioemu hypercall %lx\n", regs->r2);
return gmtime(seconds);
}
-void get_wallclock(uint64_t *sec, uint64_t *nsec)
+void get_wallclock(uint64_t *sec, uint64_t *nsec, uint64_t *now)
{
- uint64_t nano = NOW() + wc_nsec;
+ uint64_t n = NOW();
+ uint64_t nano = n + wc_nsec;
*sec = wc_sec + nano / NSEC_PER_SEC;
*nsec = nano % NSEC_PER_SEC;
+ *now = n;
}
struct tm;
struct tm wallclock_time(void);
-void get_wallclock(uint64_t *sec, uint64_t *nsec);
+void get_wallclock(uint64_t *sec, uint64_t *nsec, uint64_t *now);
#endif /* _ASM_TIME_H_ */